package main

import (
	"crow-spy/app"
	"crow-spy/conf"
	"fmt"
	"github.com/toolkits/pkg/logger"
)

func init() {
	//给配置项赋值
	conf.CrowConfig = conf.InitConfig()
	logger.Infof("打印变量：%+v\n", conf.CrowConfig)
	fmt.Printf("%c[%d;%d;%dm%s%c[0m", 0x1B, 0, 40, 32, "1.0 版本启动成功\n", 0x1B)
}

func main() {
	err := app.StartGame()
	if err != nil {
		fmt.Printf("%c[%d;%d;%dm%s%c[0m", 0x1B, 0, 40, 31, "词库中的词已用尽\n", 0x1B)
		fmt.Println("\n修改words.md文件可更新词库")
	}
	fmt.Println("按回车退出")
	fmt.Scanln()
}
